package cn.cai.pethome.system.mapper;

import cn.cai.pethome.system.domain.Permission;
import cn.cai.pethome.base.mapper.BaseMapper;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaocai
 * @since 2022-09-05
 */
@Component
public interface PermissionMapper extends BaseMapper<Permission> {


    /**
     * 根据sn查询权限
     * @param sn
     * @return
     */
    Permission findBySn(String sn);

    //查询当前登录用户拥有的菜单：手动组装树形结构
    List<String> findByLogininfoId(Long logininfoId);
}
